package com.sds.webconsole.impl;

import com.estontorise.gae_filestore.FileStoreFactory;
import com.estontorise.gae_filestore.interfaces.FileStore;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import org.sds.webconsole.api.SystemFile;
import org.sds.webconsole.api.SystemFileStore;

@Singleton
public class SystemFileStoreImpl implements SystemFileStore {

    private FileStore fileStore = FileStoreFactory.getFileStore();

    @Inject
    public SystemFileStoreImpl() {
    }

    @Override
    public SystemFile getFile(String path, boolean create) {
        return new SystemFileImpl(fileStore.getFile(path, create));
    }
}
